﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ColliderSystem
{
    public class NBoxCollider : IShape
    {
        public BoxInfo info;

        public NBoxCollider(BoxInfo info)
        {
            this.info = info;
            this.info.position.y = 0;
            this.info.size.y = 0;
            this.info.radius = this.info.size.magnitude;
        }

        public IShape Intersects(IShape other)
        {
            if (other is NSphereCollider sphere)
            {
                return sphere.Intersects(this);
            }

            return null;
        }
    }
}
